<template>
  <div class="app">
    <el-upload
      class="upload-demo"
      drag
      action="http://222.92.133.154:5912/excel/importExcel"
      multiple
      :on-success="successs"
      style="height: 100%; width: 100%"
    >
      <i class="el-icon-upload"></i>
      <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
    </el-upload>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    successs(res, file, filelist) {
      this.$message.success('上传成功')
     setTimeout(()=>{
      this.$router.push('/warn')
     },1500)
      console.log(res,'9999999999999');
    },
  },
};
</script>

<style lang="scss" scoped>
.app {
  width: 100%;
  height: 100%;
}

::v-deep .el-upload-dragger {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
::v-deep .el-upload__input {
  display: none;
}

::v-deep .el-upload {
  height: 100%;
  width: 100%;
}
</style>